package com.cmc.cloud.cmclink.doc.dto;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Objects;

/**
 * Local Charge费用 DO
 *
 * @author 集运管理员
 */
@Data
@NoArgsConstructor
public class MultiLocalCostTempDto {
    /**
     * 提单号
     */
    private Long blnoId;
    /**
     * 费用代码
     */
    private String chargeCode;
    /**
     * 计费维度 C=按体积吨计费，N=按箱计费，Y=按票计费
     */
    private String per;
    /**
     * 箱型
     */
    private String cntrType;
    /**
     * 箱尺寸
     */
    private String cntrSize;
    /**
     * 货类
     */
    private String cargoType;
    /**
     * 费率
     */
    private BigDecimal rate;
    /**
     * 币种
     */
    private String currency;

    /**
     * 付费人
     */
    private String supplier;

    /**
     * 费用发生港
     */
    private String localPort;
    /**
     * 进口还是出口
     */
    private String imExType;

    /**
     * 预付还是到付
     */
    private String payment;

    /**
     * 费用大类
     */
    private String calcuteType;

    public MultiLocalCostTempDto(Long blnoId, String chargeCode, String per, String cntrType, String cntrSize, String cargoType, BigDecimal rate, String currency, String supplier, String localPort, String imExType, String payment, String calcuteType) {
        this.blnoId = blnoId;
        this.chargeCode = chargeCode;
        this.per = per;
        this.cntrType = cntrType;
        this.cntrSize = cntrSize;
        this.cargoType = cargoType;
        this.rate = rate;
        this.currency = currency;
        this.supplier = supplier;
        this.localPort = localPort;
        this.imExType = imExType;
        this.payment = payment;
        this.calcuteType = calcuteType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        MultiLocalCostTempDto multiLocalCostTempVo = (MultiLocalCostTempDto) o;
        boolean flag = Objects.equals(blnoId, multiLocalCostTempVo.blnoId) &&
                Objects.equals(chargeCode, multiLocalCostTempVo.chargeCode) &&
                Objects.equals(per, multiLocalCostTempVo.per) &&
                Objects.equals(cntrType, multiLocalCostTempVo.cntrType) &&
                Objects.equals(cntrSize, multiLocalCostTempVo.cntrSize) &&
                Objects.equals(cargoType, multiLocalCostTempVo.cargoType) &&
                Objects.equals(rate, multiLocalCostTempVo.rate) &&
                Objects.equals(currency, multiLocalCostTempVo.currency) &&
                Objects.equals(supplier, multiLocalCostTempVo.supplier) &&
                Objects.equals(localPort, multiLocalCostTempVo.localPort) &&
                Objects.equals(imExType, multiLocalCostTempVo.imExType) &&
                Objects.equals(payment, multiLocalCostTempVo.payment) &&
                Objects.equals(calcuteType, multiLocalCostTempVo.getCalcuteType());
        return flag;
    }

    @Override
    public int hashCode() {
        return Objects.hash(blnoId, chargeCode, per, cntrType, cntrSize, cargoType, rate, currency, supplier, localPort, imExType, payment, calcuteType);
    }

    @Override
    public String toString() {
        return "blnoId=" + blnoId + ", chargeCode=" + chargeCode +
                ", per=" + per + ",cntrType" + cntrType + ",cntrSize=" + cntrSize +
                ",cargoType=" + cargoType + ",rate=" + rate + ",currency=" + currency +
                ",payer=" + supplier + ",localPort=" + localPort + ",imExType=" + imExType + ",payment=" + payment + ",calcuteType=" + calcuteType;
    }
}
